<?php

namespace iBrand\Store\Backend\Model;

use Illuminate\Database\Eloquent\Model;
use Prettus\Repository\Contracts\Transformable;
use Prettus\Repository\Traits\TransformableTrait;

class OrderAdjustment extends Model implements Transformable
{
	use TransformableTrait;

	protected $table = 'el_order_adjustment';

	protected $guarded = ['id'];

	public function discount()
	{
		return $this->hasOne('iBrand\Component\Discount\Models\Discount', 'id', 'origin_id');
	}

	public function order()
	{
		return $this->hasOne('iBrand\Store\Backend\Model\Order', 'id', 'order_id');
	}
}
